home *** CD-ROM | disk | FTP | other *** search
/ Cubase Magazine 52 / Issue #52.iso / pc / 2-SOFTWARE / MQv8Demo / MQ.Z / Perform Patch Select Macros.txt < prev    next >
Encoding:
Text File  |  2000-06-13  |  1.4 KB  |  51 lines

  1. The Performance Retrieve macro
  2.  
  3. line 1: load patch number into Y
  4. line 2: load group id into Z (0 - 127)
  5. line 3: load group into X; 
  6. line 4: if Z (group id) is 0 up it to 1 then reduce group id by 1
  7.  
  8. line 5: if group==0 calc bank offset from 0, add patch num and return
  9. line 6: if group==1 calc bank offset from 1536, only allow one bank
  10. line 7: group==2 for the remainder (EXP) calc bank+patch, ofs from 1792
  11.  
  12.  
  13. MW = 0 MW * V3 MW + V4 MW + 4 FR X W MW + 1 FR Y W MX < 4 MY | X 
  14. MW - 2 FR Z W 
  15. MW - 1 FR X W 
  16. IFQ Z 0 MZ = 1 IFE MZ - 1 
  17.  
  18. IFQ X 0 MZ * 256 MY + Z RET Y ] IFE 
  19. IFQ X 1 MZ % 1 MZ * 256 MZ + 1536 MY + Z RET Y ] IFE 
  20. MZ % 12 MZ * 256 MZ + 1792 MY + Z RET Y 
  21.  
  22.  
  23.  
  24. The Performance Store Macro
  25.  
  26. line 1: calc the start offset for the data
  27. line 2: store the high part of the patch
  28. line 3: store the low part of the patch 
  29. line 4: get the edit value into x, calc a bank number, zero y
  30. line 5: set Y=1 if this is a PCM bank
  31. line 6: set Y=2 if this is an EXP bank
  32. line 7: get the bank into x again
  33. line 8: calc the bank num for PCM bank
  34. line 9: calc the bank num for EXP bank
  35. line 10: save group and group ID values
  36.  
  37. MW = 0 MW * V3 MW + V4 MW + 4 
  38. MZ = X MY = X MX > 4 MX & 15 FS X W 
  39. MW + 1 MY & 15 FS Y W 
  40.  
  41. MX = Z MX / 256 MY = 0 
  42.  
  43. MX - 5 IFG X MY = 1 IFE 
  44. MX - 1 IFG X MY = 2 IFE 
  45.  
  46. MX = Z MX / 256 
  47. IFQ Y 1 MX - 6 IFE 
  48. IFQ Y 2 MX - 7 IFE 
  49.  
  50. MX + 1 MW - 3 FS Y W MW + 1 FS X W 
  51.